package com.ddl.service;

import com.ddl.common.enums.Platform;
import com.ddl.common.exception.ResultModel;
import com.ddl.pojo.User;

/**
 * @author: liyuxiang
 * @create: 2018-11-01
 */
public interface UserService {
    /**
     * 校验用户参数
     * @param userId
     * @param token
     * @param platform
     * @throws Exception
     */
    void verifyUser(String userId, String token, Platform platform) throws Exception;

    ResultModel register(User user);

    ResultModel login(String account, String password);

    ResultModel findAccount(String phone, String smsCode, String password);

    ResultModel logOut(String token);

    ResultModel updatePwd(int userId, String oldPwd, String newPwd);

    ResultModel isFirstLogin(String userId);
}
